function loadAssignmentServices(ticketId, radTicketId) {
	$.ajax({
	    type:    "GET",
	    url:      "../Radiology/GetAssignmentServicesAjax?set_ajax_view",
	    data:     "radTicketId=" + radTicketId,
	    dataType: "json",
	    success:    function(data) {
	        if (data.error.code == 'OK') {
                $('input#doctorName' + ticketId).val(data.result.doctorName);
                $('#ticketName' + ticketId).text(data.result.ticketName);
                $('#doctorName' + ticketId).text(data.result.doctorName);
                $('#diagnosis' + ticketId).html(data.result.diagnosis);
                $('#ticketItemTbl' + ticketId +' tbody').html(data.result.service);
	        }
	        else {
	            displayError(data.error.mess);              
	        }
	    }
	});
}

function confirmDelete(ticketId, triggeredElement) {
    radTicketId =   $('#assignmentId' + ticketId).val();
    if(radTicketId==null || radTicketId == 0 || radTicketId==''){
        return;
    }
    promptConfirm(_("Delete"),_('Are you sure to delete this radiology ticket?'), function() {
            deleteRadiologyTicket(radTicketId, triggeredElement); 
            return true;
    },'YesNo','warn',_('No'));
}

function deleteRadiologyTicket(radTicketId, triggeredElement) {
    showAjaxLoader('deleteLoaderDiv' + radTicketId, 'deleteButtonDiv' + radTicketId, true);
    $.ajax({
        type:    "GET",
        url:      "../Radiology/DeleteAssignmentTicketAjax?set_ajax_view",
        data:     "radTicketId=" + radTicketId,
        dataType: "json",
        success:    function(data) {
            if (data.error.code == 'OK') {
                showAjaxLoader('deleteLoaderDiv', 'deleteButtonDiv', false);
                $('#' + triggeredElement).trigger('click');
            }
            else {
                displayError(data.error.mess);              
            }
        }
    });
}